using System.Collections.Generic;
using System.Linq;
using EBE.COM.Core.Interfaces;

namespace EBE.COM.Core.Test.Categories
{
  public class FakeCategoryFactory : ICategoryFactory
  {
    public ICategory MakeCategory(int id)
    {
      return new FakeCategory { Id = id, Name = string.Format("CAT000{0}", id) };
    }

    public IQueryable<ICategory> MakeCategories()
    {
      var list = new List<ICategory>();
      for (var i = 0; i < 10; i++)
      {
        list.Add(MakeCategory(101 + i));
      }
      return list.AsQueryable(); // why use this interface?
    }
  }
}
